import configparser
from src.tool import throw
import json
import src.constant as constant
from src.net import Server
from database.dbop import Database
import os
import src.global_config as gl
import src.tool as tool
from src.log import Log
from ai.engine import Honinbo
from src.go import Go

from ai.mcts import Mcts

# 配置文件地址
filename = './config.ini'
# 读取程序配置
config = configparser.ConfigParser()
config.read(filename, encoding='utf-8')

# ai相关的存全局变量
gl.set_value('ai', config['ai'])
gl.set_value('model_path', config['model'])

mcts = Mcts()
go = Go()
engine = Honinbo()

# 主函数
if __name__ == '__main__':
    goban = []
    color = 1
    num = 1
    mcts.analyze(goban)
    leaf = mcts.root.get_leaf()
    print("leaf - >", leaf)
